package cg.studio.practise.laddersnake;

/**
 * Design an optimised algorithm to solve snakes and ladders with the least amount of roles possible 
 * under the assumption that you get whatever role you want when you role the dice.
 *
 * We call both ladder and snake as Deliver( basically, ladder and snake are switch from one point to another point )
 * we can use map ( source_point ==> destination_point ) to represents Deliver
 * 
 * if there two delivers are connect( the destination of first deliver is same as the source of second deliver ), 
 * then, they can be merged into one deliver
 * 
 * assume deliver1 is the deliver which source most close to the start point, then, if deliver1 is used as route, 
 * then it must be the first  deliver. Assume there is an another deliver ( deliver_p ) which before deliver1, then,
 * the route ( start -> deliver_p -> deliver1 ->end ) must large than ( start -> deliver1 -> end ).
 * 
 * for the same reason, if a deliver( deliver2 ) which destination is most close to the end point, then if deliver2 is 
 * in the route, it must at the end of most delivers )
 * 
 * so, based on above, we got sequence of deliver( if they are in the route ) based on the source and destination.
 * if there delivers which are conflict based on source and destination( for example, base on source, sequence are
 * deliver_p, deliver_q ), but base on the destination, sequence are deliver_q, deliver_p ), then, at lease one deliver
 * should not in the route.
 * 
 * so, we can get a list of deliver ( d1, d2, ..., dn ) which represents the sequence of delivers, 
 * and a map( deliver => list of deliver ) represents the key deliver and its conflicts delivers
 * 
 * when we moved the start point, the start point changed, and the sequence and conflicts are changed to.
 * but the destination never change.
 * 
 * another rule, as there no way to go back, if the point move to certain place, all the delivers which source are
 * less than this point can't be the next deliver.
 * 
 * @author brightchen
 *
 */
public class SmartPlayer extends DeliverGame
{
  public SmartPlayer( int edgeSize )
  {
    super( edgeSize );
  }

  /**
   * override this function to 
   */
  @Override
  protected int getDice()
  {
    return 1;
  }
}
